/*
 * @Author: shuai
 * @Date: 2021-04-02 08:48:36
 * @LastEditors: shuai
 * @LastEditTime: 2021-04-04 09:52:16
 * @Description: file content
 */
import { App } from 'vue'
import SvgIcon from '@/components/SvgIcon/index.vue' // svg component

// register globally
// Vue.component('svg-icon', SvgIcon)

const req = require.context('./svg', false, /\.svg$/)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const requireAll = (requireContext: any) => requireContext.keys().map(requireContext)
requireAll(req) // import引入所有的svg

export default (app: App) => {
  app.component('svg-icon', SvgIcon)
}
